GtkAssistant: Fix problems with gtk_widget_show_all()
authorBastien Nocera <hadess@hadess.net>
Thu, 22 Sep 2011 18:46:40 +0000 (19:46 +0100)
committerBastien Nocera <hadess@hadess.net>
Fri, 23 Sep 2011 11:45:09 +0000 (12:45 +0100)
gtk_widget_show_all() would have shown every single item inside
the GtkAssistant sidebar, as well as all the navigation buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=659826

gtk/gtkassistant.c

index 4060693d611baecb25c1c127a200c7aaf0b2a37d..ed8fc31c49ec0ff3703209f60c604e3c428bcb5a 100644 (file)
@@ -1018,6 +1018,13 @@ gtk_assistant_init (GtkAssistant *assistant)
   gtk_size_group_add_widget (priv->button_size_group, priv->cancel);
   gtk_size_group_add_widget (priv->button_size_group, priv->last);
 
+  gtk_widget_set_no_show_all (priv->close, TRUE);
+  gtk_widget_set_no_show_all (priv->apply, TRUE);
+  gtk_widget_set_no_show_all (priv->forward, TRUE);
+  gtk_widget_set_no_show_all (priv->back, TRUE);
+  gtk_widget_set_no_show_all (priv->cancel, TRUE);
+  gtk_widget_set_no_show_all (priv->last, TRUE);
+
   if (!alternative_button_order (assistant))
     {
       gtk_box_pack_end (GTK_BOX (priv->action_area), priv->apply, FALSE, FALSE, 0);
@@ -1608,7 +1615,9 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
   page_info = g_slice_new0 (GtkAssistantPage);
   page_info->page  = page;
   page_info->regular_title = gtk_label_new (NULL);
+  gtk_widget_set_no_show_all (page_info->regular_title, TRUE);
   page_info->current_title = gtk_label_new (NULL);
+  gtk_widget_set_no_show_all (page_info->current_title, TRUE);
 
   /* Note: we need to use misc alignment here as long as GtkLabel
    * pays attention to it. GtkWiget::halign is ineffective, since